<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/easypaginate.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>

        <link rel="stylesheet" type="text/css" href="../css/paging.css"/>
        <link rel="stylesheet" type="text/css" href="../css/dropdown.css"/>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){

                //   $j(".sidebar").fancybox().trigger('click');
                $j( ".showMessageBirthday" ).draggable();
                $j(".closeBirthday").live('click',function(){
                    $j(this).parent().hide();
                });
                $j('input#leavedate111').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                $j('input#leavedate112').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                initThickBox('.thickbox');
                $j('input#leavedate1').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#leavedate1a').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#leavedate1b').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#dateStart').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#dateEnd').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                   
                $j('.text_search').live('keyup',function(){
                    if($j('.text_search').val() == ""){
                        $j('.noteRow').show();
                        $j('.close').trigger('click');   
                                   
                    }else{
                        $j('.close').trigger('click');   
                        $j('.noteRow').hide();
                        $j('.noteRow').each(function(){
                            html = $j(this).html();                            
                            if(ununicode(html).indexOf(ununicode($j('.text_search').val())) > -1)  {                                
                                $j(this).show();
                            }else{
                                $j(this).hide();
                            }
                        });
                    }

                });
                    
                $j('.check_select').live('click',function(){
                    var lang= $j(this).attr("lang");
                    var boool;
                    // alert(lang)               
                    if( $j(this).is(":checked"))
                    {
                        boool = true;
                    }
                    else
                    {
                        boool = false;
                    }
                            
                    $j.post("customerexpand.jsp?action=addCusp100&p100="+lang+"&valueC="+boool,function(data){
                            
                    });
                });
                    
                $j(".checkAll").live("click",function(){
                    
                    flag = $j('.checkAll').is(':checked');
                       
                    $j(".check_select").each(function(){
                        $j('.check_select')  .attr('checked', flag);
                    });
                        
                    var boool;
                    if( $j(this).is(":checked"))
                    {
                        boool = true;
                    }
                    else
                    {
                        boool = false;
                    }
                        
                    $j.post("customerexpand.jsp?action=addAllCusp100&boool="+boool,function(data){
                            
                    });

                });
                    
                $j(".rich-table-row:odd").addClass("odd");
                    
                // Begin Event load ajax form CRM
                $j('.contactN950').live('click',function(){
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();
                    $j(".mesage").text("");
                    $j.post("contactCRM.jsp?action=editajaxpage&pn100="+ pn100KH+"&table=N100", function(data){
                        $j('.customer-boxcontact').html(data);
                    });
                    
                });
                $j('.acountT025').live('click',function(){
                    $j(".mesage").text("");
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();         
                    $j.post("accountCRM.jsp?action=editajaxpage&pn100="+pn100KH+"&tv026=N100",function(data){
                        $j('.customer-boxacount').html(data);
                    }) ;
                    
                });
                
                $j('.customerK100').live('click',function(){
                    $j(".mesage").text("");
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();  
                    $j.post("customerdemo.jsp?action=editEmp&pn100="+ pn100KH+"&table=formload&pt025=1&itemid=N100", function(data){
                        $j('.customer-boxcustomer').html(data);
                    });
                    
                });
                
                $j('.infoN350').live('click',function(){
                    $j(".mesage").text("");
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val(); 
                    $j.post("passportCRM.jsp?action=editajaxpage&pn100="+ pn100KH, function(data){
                        $j('.customer-boxN350').html(data);
                    });
                    
                });
                $j('.companyCRM').live('click',function(){
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();   
                    $j.post("companyCRM.jsp?action=editajaxpage&pn100="+ pn100KH, function(data){
                        $j('.customer-companyCRM').html(data);
                    }) ;
                    
                }); 
                   
                // End Event load ajax form CRM for Dashbord
                // Show hide form customerInputExpand from Customer
                $j('.header-box').live('click', function(){ 
                    $j(".mesage").text("");
                    if($j(this).next('.customer-box').css('display') != 'none'){
                        return;
                    }else{
                        var PN100=$j('#form-input-customerform\\:PN100').val();
                        // var PN100 = $j('#formKHCN\\:pn100').val(); 
                        if(PN100 != 0)
                        {
                            $j('.messa').hide();
                            $j('.customer-box').slideUp();                         
                            $j('.boder-bomttom').removeClass('boder-bomttom');
                            $j(this).next('.customer-box').slideDown();
                            $j(this).addClass('boder-bomttom');
                        } else{                        
                            $j('.messa').show();
                            $j(this).next('.customer-box').css('display') != 'none'
                        }
                           
                    }

                });
                // Lịch sử khách hàng
                $j('.loadHistory').live('click',function(){
                    dayss = $j(this).attr('lang');
                    // window.location.href="customerexpand.jsp?action=reloadfordays&dayss="+dayss;
                    $j.post("actionCompany.jsp?action=reloadfordays&dayss="+dayss,function(data){
                        if(data!=null){
                            window.location.href="customerexpandays.jsp?action=reloadfordays&dayss="+dayss;
                        }
                    });
                });
                
               
            });
        </script>

    </head>

    <script type="text/javascript" language="javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
       
            $j( ".sendSMS_person" ).click(function() {
                $j( "#togglesms" ).show();
                $j( "#togglesms" ).animate({height:'auto',opacity:'0.9'},"slow");
                $j( "#togglesms" ).animate({width:'39%',opacity:'0.9'},"slow");
                var info = $j(this).attr('lang');
                $j.post("SgtSMS.jsp?action=send_sms_person&"+info,function(data){
                    if(data!=null){
                        $j( "#togglesms" ).html(data);
                    }
                });
            });
        });
    </script>
    <style>
        .sendSMS_person{
            color: #0055A6;;
            cursor: pointer;
        }
    </style>
    <body>
        <div id="togglesms">

        </div>
        <a4j:form>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <h:outputText value="<div class='permission' lang='#{loginSession.right.MENU_DAB_VIEW}'></div>" escape="false"/>
            <div id="content">
                <div id="menutop_top">
                    <div class="div_search_menutop">
                        <div class="item_search">

                            <h:inputText onfocus="if(this.value=='search') this.value='';" style="float:left;" styleClass="text_search" value="#{customerExpand.keySearch}"/>
                            <div style="float:left;border-top: 1px solid #55ACDB;border-bottom: 1px solid #55ACDB;" class="img_search"> <h:graphicImage style="float:left;" value="../images1/arrow_down.png"/></div>
                            <div style="float:left;border: 1px solid #55ACDB;"> <h:graphicImage styleClass="find_all_emp" style="float:left;" value="../images1/btn_search.png"/></div>
                        </div>
                        <div class="form_search_header">
                            <div class="item_search "><h:outputText value="x" styleClass="close_search" style="font-weight:bold;float:right;margin-right:2.2%;"/></div>
                            <div class="item_search">
                                <table id="table_search">
                                    <tr>
                                        <td class="celltable">
                                            <h:selectOneRadio styleClass="css_radio" value="#{customerExpand.typesearch}">
                                                <f:selectItem itemValue="1" itemLabel="Công ty" />

                                                <f:selectItem itemValue="2" itemLabel="Phone" />
                                                <f:selectItem itemValue="3" itemLabel="Họ tên" />
                                                <f:selectItem itemValue="4" itemLabel="CMND/PP" />
                                                <f:selectItem itemValue="5" itemLabel="Email" />
                                                <f:selectItem itemValue="6" itemLabel="Tour" />
                                                <f:selectItem itemValue="7" itemLabel="MSKH" />
                                            </h:selectOneRadio>
                                        </td>

                                    </tr>
                                    <tr>
                                        <td class="celltable">
                                            <h:commandButton      action="#{customerExpand.reload}" value="#{locale.search}" styleClass="buttonsearch">
                                            </h:commandButton>
                                        </td>

                                    </tr>
                                </table>

                            </div>
                        </div>
                    </div>

                    <div class="icon_action">
                        <%--   <h:outputLink rendered="#{loginSession.right.DAB_LST_CRE}"   value="customerInputExpand.jsp?flagform=1&flagexpand=false&height=453&amp;width=741&amp;modal=true" styleClass="fancybox">
                              <span><h:graphicImage value="../../images1/add_per.png" title="#{locale.addCustomer}"/></span>
                          </h:outputLink> --%>
                        <h:outputLink rendered="#{loginSession.right.EMP_LST_HOL}" value="employeeCalender.jsp?action=datetoday&pageString=datetoday1&type=0">
                            <img style="float: left; " src="../images1/holiday.png" title="Nghỉ phép"/>
                        </h:outputLink>

                    </div>

                    <div class="icon_action">
                        <img class="sendSMS_person" lang="page=customerexpand.jsp&group=0" src="../images1/sms.png" alt="SMS" title="Xác nhận  SMS"/>

                    </div>
                    <div class="icon_action">
                        <h:panelGroup rendered="#{loginSession.right.DAB_LST_MAL}">
                            <h:outputLink style="color:#fff;"   value="popUpSendEmail.jsp?page=customerexpand&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  >
                                <img src="../images1/email.png" alt="Email" title="Gửi email"/>
                            </h:outputLink>
                        </h:panelGroup>
                    </div>

                    <div class="icon_action">
                        <h:panelGroup rendered="#{loginSession.right.DAB_LST_STI}">
                            <h:outputLink value="reportNStatic.jsp">
                                <h:graphicImage value="../../images1/thongke.png" title="Thống kê"/>
                            </h:outputLink>
                        </h:panelGroup>

                    </div>



                </div>
                <div id="menutop">
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#"><span>Khu vực</span></a>
                        </div>
                        <div class="select_hidden">
                            <ul>

                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <h:panelGroup rendered="#{loginSession.right.DAB_LST_PAR}">
                        <div class="dropdown">
                            <div class="select_choise">
                                <a href="#">
                                    <span class="department2" lang="<h:outputText value="#{n450_n850.fn850}"/>">
                                        <h:outputText rendered="#{n450_n850.fn850 !=0}" value="#{n450_n850.nv851}"/>
                                        <h:outputText rendered="#{n450_n850.fn850 ==0}" value="Tất cả"/>
                                    </span>
                                </a>

                            </div>
                            <div class="select_hidden departmentlistN850">

                                <ul>
                                    <li><a href="#"><span class="department3" lang="<h:outputText value="0"/>">
                                                <h:outputText value="Tất cả"/>
                                            </span></a></li>                          


                                    <a4j:repeat value="#{n450_n850.listComb850}" var="item">
                                        <li><a href="#"><span class="department2" lang="<h:outputText value="#{item.value}"/>">
                                                    <h:outputText value="#{item.label}"/>
                                                </span></a></li> 
                                            </a4j:repeat>
                                </ul>
                            </div>
                        </div>
                    </h:panelGroup>

                </div>

                <h:panelGroup rendered="#{customerExpand.typesearch == 7 || customerExpand.typesearch == 5|| customerExpand.typesearch == 4|| customerExpand.typesearch == 3|| customerExpand.typesearch == 2|| customerExpand.typesearch == 0 }" >
                    <div style="width: 100%;float: left;height: 67%;overflow: auto;">
                        <div class="headerdivtable">
                            <div class="itemheaderdivtable_center" style="width: 2%;">
                                <h:selectBooleanCheckbox rendered="#{loginSession.right.DAB_CHE_ALL}" styleClass="checkAll" />
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 10%;">
                                <h:outputText value="Chức năng"/>
                            </div>

                            <div class="itemheaderdivtable_center" style="width: 15%;">
                                <h:outputText value="HỌ TÊN" />
                            </div>
                            <%--  <div class="itemheaderdivtable_center" style="width: 6%;">
                                  <h:outputText value="XÉT DUYỆT"/>
                              </div> --%>
                            <div class="itemheaderdivtable_center" style="width: 10%;">
                                <h:outputText value="Trạng thái"/>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 15%;">
                                <h:outputText value="Email"/>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 8%;">
                                <h:outputText value="Điện thoại"/>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 10%;">
                                <h:outputText value="Công ty"/>
                            </div>

                            <div class="itemheaderdivtable_center" style="width: 12%;">
                                <h:outputText value="Địa chỉ" />
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 14.6%;">
                                <h:outputText value="Cập nhật"/>
                            </div>

                        </div>

                        <div class="headerdivtable_over">
                            <a4j:repeat  value="#{customerExpand.list}" var="cus" rowKeyVar="index" >

                                <div class="noteRow headerdivtable_bootom <h:outputText rendered="#{index%2 !=0}"  value="headerdivtable_tr"/>">
                                    <div class="itemheaderdivtable_center " style="width: 2%;color:#0055A6;">
                                        <h:selectBooleanCheckbox rendered="#{loginSession.right.DAB_CHE_ONL}" value="#{cus.selected}" styleClass="check_select" lang="#{cus.pn100}"/>
                                    </div>
                                    <div class="itemheaderdivtable_center" style="width: 10%;">
                                        <h:outputLink rendered="#{loginSession.right.DAB_LST_WCI}"  value="workChargeDashInput.jsp?action=addDash&pn100=#{cus.pn100}&fk100=#{cus.fk100}&page=customerExpand.jsp&height=300px&width=500px" styleClass="fancybox">
                                            <img src="../images/workcharge.png" alt="CH" title="Chăm sóc khách hàng" style="padding-right:4px;"/>
                                        </h:outputLink>

                                        <h:outputLink rendered="#{loginSession.right.DAB_LST_HIS}" value="tourjoin.jsp?pn100=#{cus.pn100}&KeepThis=true&amp;TB_iframe=true&amp;height=453&amp;width=941&amp;modal=true" styleClass="thickbox add_new" id="thickbox2"  style="cursor:pointer" >
                                            <img  height="15px" width="15px" src="../images/08.png" alt="History"  title="History" />
                                        </h:outputLink>
                                        <h:outputLink rendered="#{loginSession.right.DAB_LST_MOD}"  value="customerInputExpand.jsp?pn100=#{cus.pn100}&fk100=#{cus.fk100}&action=edit&height=300px&width=500px&flagform=1" styleClass="fancybox">
                                            <img src="../images/edit.png" alt="edit" title="edit"/>
                                        </h:outputLink>
                                    </div>
                                    <div class="itemheaderdivtable_left" style="width: 15%;">
                                        <h:outputLink value="customer.jsp?action=linkCus&pnPN100=#{cus.pn100}&type=#{cus.ni104}"> <h:outputText value="#{cus.hoten}"/></h:outputLink>
                                    </div>
                                    <div class="itemheaderdivtable_left graphic" style="width: 10%;">
                                        <h:outputText value="#{cus.kv331}"/>



                                    </div>

                                    <div class="itemheaderdivtable_left" style="width: 15%;">
                                        <h:outputLink value="popupSendMailPerson.jsp?page=customerexpand&idx=#{cus.pn100}&mailx=#{cus.nv105}&typex=customerexpand&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  ><h:outputText value="#{cus.nv105}" /></h:outputLink>
                                    </div>
                                    <div class="itemheaderdivtable_center" style="width: 8%;">
                                        <h:outputText value="#{cus.nv958}" styleClass="sendSMS_person" lang="page=customerexpand.jsp&group=1&hoten=#{cus.hoten1}&phone=#{cus.nv958}&fn100=#{cus.pn100}"/>
                                    </div>
                                    <!--                                    <div class="itemheaderdivtable_center" style="width: 8%;">
                                    <h:outputText value="#{cus.nv109}" />
                                  </div>-->
                                    <div class="itemheaderdivtable_left " style="width: 10%;">
                                        <h:outputLink value="cuscompany.jsp?action=linkCom&pnPK100=#{cus.fk100}&type=#{cus.kn114}"><h:outputText value="#{cus.subKv103}" title="#{cus.kv103}" /></h:outputLink>
                                    </div>
                                    <div class="itemheaderdivtable_left " style="width: 12%;">
                                        <h:outputText value="#{cus.subNv112}" title="#{cus.nv112}" />
                                    </div>

                                    <div class="itemheaderdivtable_left " style="width: 14.6%;">
                                        <h:outputText value="#{cus.nl148}</br>#{cus.nl149}" escape="false" />
                                    </div>




                                </div>
                                <div class="noteContent">

                                </div>
                            </a4j:repeat>
                        </div>
                    </div>
                </h:panelGroup>
                <h:panelGroup rendered="#{customerExpand.typesearch == 6}" >
                    <div class="content-dashboard">
                        <rich:dataTable value="#{customerExpand.list}" var="cus"
                                        width="926px" columnClasses=",columns,columns,columns" rowKeyVar="row"
                                        id="table3" styleClass="machinePosDataTable">

                            <rich:column style="width:10%; text-align:center">
                                <f:facet name="header">
                                    <h:selectBooleanCheckbox  styleClass="checkAll" />
                                </f:facet>
                                <h:selectBooleanCheckbox value="#{cus.selected}"  styleClass="check_select" lang="#{cus.pn100}"/>
                            </rich:column>
                            <rich:column style="width:10%">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.code_tour}" />
                                </f:facet>
                                <div style="width:120px;">
                                    <h:outputLink value="listTour.jsp?action=linkrecord&fv050=#{cus.pv050}&tabel=T">
                                        <h:outputText value="#{cus.vv051}" />
                                    </h:outputLink>
                                </div>
                            </rich:column>
                            <rich:column style="width:10%">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.description}" />
                                </f:facet>
                                <div style="width:120px;">
                                    <h:outputText value="#{cus.vv052}" />
                                </div>
                            </rich:column>
                            <rich:column style="width:10%">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.frist_lastname}" />
                                </f:facet>
                                <div style="width:120px;">
                                    <h:outputText value="#{cus.hoten}" />
                                </div>
                            </rich:column>

                            <rich:column  width="10%" styleClass="email">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.email}" />
                                </f:facet>

                                <div style="width:160px;">

                                    <h:outputLink value="popupSendMailPerson.jsp?page=customerexpand&idx=#{cus.pn100}&mailx=#{cus.nv105}&typex=customerexpand&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  ><h:outputText value="#{cus.nv105}" /></h:outputLink>
                                    </div>
                            </rich:column>
                            <rich:column  width="10%">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.telephone}" />
                                </f:facet>

                                <div style="width:80px;">
                                    <h:outputText value="#{cus.mob1}" styleClass="sendSMS_person" lang="page=customerexpand.jsp&group=1&hoten=#{cus.hoten1}&phone=#{cus.mob1}&fn100=#{cus.pn100}"/>
                                    <%--1
                                    <h:outputLink value="viewSMSTemplateBir.jsp?action=sendSMSbir&hoten=#{cus.hoten}&phone=#{cus.mob1}">
                                        <h:outputText value="#{cus.mob1}"/>
                                    </h:outputLink> --%>
                                    <%-- <a href="viewSMSTemplateBir.jsp?action=sendSMSbir&hoten=<h:outputText value="#{cus.hoten}" />&mv306=<h:outputText value="#{cus.vv051}" />&pn100=<h:outputText value="#{cus.pn100}" />&phone=<h:outputText value="#{cus.mob1}" />" class="fancybox actionsendsms"> <h:outputText value="#{cus.mob1}" styleClass="phone" lang="#{cus.mob1}"/> </h2> <h:outputText rendered="#{cus.mob1=='' ||  cus.mob1== null}" value="<br/>" escape="false"/></a></h2> --%>

                                </div>
                            </rich:column>

                            <rich:column  width="10%">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.company}" />
                                </f:facet>

                                <div style="width:100px;">
                                    <h:outputText value="#{cus.com}" />
                                </div>
                            </rich:column>


                            <rich:column  style="width:10%">
                                <f:facet name="header">
                                    <h:outputText value="#{locale.address}" />
                                </f:facet>
                                <div style="width:200px;">
                                    <h:outputText value="#{cus.adr}" />
                                </div>

                            </rich:column>
                            <rich:column style="width:10%; text-align:center">
                                <f:facet name="header">
                                    <h:outputText value="" />
                                </f:facet>

                                <a target="_blank" href="documentTour.jsp?action=linkrecord&fv050=<h:outputText value="#{cus.fv050}" />" ><img  height="12px" src="../images/docs_icon.png" alt="Document"  title="Document"  /></a>
                                    <%-- <a target="_blank" href="customer4tour.jsp?pv050=<h:outputText value="#{cus.fv050}" />" ><img  height="12px" src="../images/history.png" alt="History"  title="History"  /></a>--%>

                            </rich:column>

                        </rich:dataTable>
                    </div>

                </h:panelGroup>

                <h:panelGroup rendered="#{customerExpand.typesearch == 1}" >
                    <div style="width: 100%;float: left;height: 67%;overflow: auto;">
                        <div class="headerdivtable">

                            <div class="itemheaderdivtable_center" style="width: 10%;">
                                <h:outputText value="Chức năng"/>
                            </div>

                            <div class="itemheaderdivtable_center" style="width: 20%;">
                                <h:outputText value="Công ty" />
                            </div>

                            <div class="itemheaderdivtable_center" style="width: 10%;">
                                <h:outputText value="Điện thoại"/>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 10%;">
                                <h:outputText value="Email"/>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 27.7%;">
                                <h:outputText value="Địa chỉ"/>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 20%;">
                                <h:outputText value="Ghi chú"/>
                            </div>


                        </div>

                        <div class="headerdivtable_over">
                            <a4j:repeat  value="#{customerExpand.listK100TT}" var="cus" rowKeyVar="index" >
                                <div class="noteRow headerdivtable_bootom <h:outputText rendered="#{index%2 !=0}"  value="headerdivtable_tr"/>">

                                    <div class="itemheaderdivtable_center" style="width: 10%;">
                                        <h:outputLink rendered="#{loginSession.right.DAB_LST_WCI}"  value="" styleClass="fancybox">
                                            <img src="../images/workcharge.png" alt="CH" title="Chăm sóc khách hàng"/>
                                        </h:outputLink>

                                        <h:outputLink rendered="#{loginSession.right.DAB_LST_HIS}" value="" styleClass="thickbox" id="thickbox2"  style="cursor:pointer" >
                                            <img  height="15px" width="15px" src="../images/08.png" alt="History"  title="History" />
                                        </h:outputLink>
                                        <h:outputLink rendered="#{loginSession.right.DAB_LST_MOD}"  value="" styleClass="fancybox">
                                            <img src="../images/edit.png" alt="edit" title="edit"/>
                                        </h:outputLink>
                                    </div>

                                    <div class="itemheaderdivtable_left" style="width: 20%;">
                                        <h:outputLink value="cuscompany.jsp?action1=1&action=linkCom&pnPK100=#{cus.pk100}&type=#{cus.kn114}"><h:outputText value="#{cus.subKv103}" title="#{cus.kv103}" /></h:outputLink>
                                        </div>

                                        <div class="itemheaderdivtable_center" style="width: 10%;">
                                        <h:outputText value="#{cus.kv958}" />
                                    </div>
                                    <div class="itemheaderdivtable_left" style="width: 10%;">
                                        <h:outputLink value="popupSendMailPerson.jsp?page=customerexpand&idx=&mailx=&typex=customerexpand&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  >
                                            <h:outputText value="#{cus.kv967}" />
                                        </h:outputLink>
                                    </div>
                                    <div class="itemheaderdivtable_left" style="width: 27.7%;">
                                        <h:outputText value="#{cus.subAddress}" title="#{cus.kv952}" />
                                    </div>
                                    <div class="itemheaderdivtable_left" style="width: 20%;">
                                        <h:outputText value="#{cus.kv101st}" title="#{cus.kv101}" />
                                    </div>

                                </div>
                                <div class="noteContent">

                                </div>
                            </a4j:repeat>
                        </div>
                    </div>
                </h:panelGroup>
                <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                 height="30" width="40" zindex="2000">
                    <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                </rich:modalPanel>

                <div class="fotter-page">
                    <jsp:include page="../../common/pagingCusomerExpand.jsp"/>
                </div> 
            </div>
        </a4j:form>

    </body>
</html>
<script type="text/javascript" language="javascript">
    var open_cur = 0;
    $j = jQuery.noConflict();
    $j(document).ready(function(){
    
        $j(".department2").live("click",function(){
                    
            fh200 = $j(".donvi").attr("lang");
            fn850 = $j(this).attr("lang");
            fn450 = $j(".department1").attr("lang");
            //   showPleaseWait(); 
            dayss = $j('.loadHistory').attr('lang');
            emp =  $j('.cbx_editEmp').children("option:selected").val();
            $j.post("N450_N850.jsp?&action=group&fh200="+fh200+"&fn450="+fn450 +"&fn850="+fn850+"&emp="+emp,function(data){
                if(data!=null){ 
                    window.location.href="customerexpand.jsp?action=reloadfordays&dayss="+0+"&flagFN850=10";
                    //       hidePleaseWait();        
                }
            }); 
        });
                
        $j(".department3").live("click",function(){
            //                     alert("department3");
            emp =  $j('.cbx_editEmp').children("option:selected").val();
            fh200 = $j(".donvi").attr("lang");
            fn850 = $j(this).attr("lang");
            fn450 = $j(".department1").attr("lang");
            dayss = $j('.loadHistory').attr('lang');
            // showPleaseWait(); 
            $j.post("N450_N850.jsp?&action=group&fh200="+fh200+"&fn450="+fn450 +"&fn850="+fn850+"&emp="+emp,function(data){
                if(data!=null){ 
                    window.location.href="customerexpand.jsp?action=reloadfordays&dayss="+0+"&flagFN850=10";
                    //       hidePleaseWait();        
                }
            }); 
        });
        $j('.search_boxnew').hide();       
        $j('.sidebar_search').live('click',function(){
            $j('.search_boxnew').hide();
            if($j(this).next().hasClass('active')){

                $j('.search_boxnew').removeClass('active');
            }else{

                $j('.search_boxnew').removeClass('active');
                $j(this).next().addClass('active');
                $j(this).next().show();
            }
        });
        $j(".content_right").live("click",function(){
            $j('.search_boxnew').hide();
        });
    });
</script>
<style>
    .customer-box{
        float:left; width:604px; margin-left:25px;
        border:1px solid #CCCCCC;
        padding:18px 0px 10px 0px;
        background: #E5E8EA;
        border-top: none;

    }
    .customer-box label{
        width:90px;
        text-align: right;
        float:left;
    }

    /*                    select{
                            float:left;
                            height: 21px;
                            width:166px;
                            margin-left:9px;
                        }*/
    .ui-datepicker-header select{
        width:45% !important;
    }
    .header-box{
        margin-left:25px;
        color:#263340;
        margin-top:10px;
        float: left;
        cursor:pointer;
        padding:4px 0px 0px 4px; 
        width:600px;
        border:1px solid #CCCCCC;
        font-size:12px;
        background: #D4D7D8;
        height: 21px;
        font-weight: bold;
    }
</style>